<!DOCTYPE html>
<html lang="zh">
{include file="public/head"}
  
<body>
<div class="container-fluid">
  
  <div class="row">
    
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form class="row" id="common_form" action="{$action}" method="post">
            <div class="mb-3 col-md-12">
              <label for="status" class="form-label">类型</label>
              <div class="clearfix">
                <div class="form-check form-check-inline">
                  <input type="radio" id="type" name="type" class="form-check-input" value="1" {if $info.type == 1}checked{/if}>
                  <label class="form-check-label" for="type">菜单</label>
                </div>
                <div class="form-check form-check-inline">
                  <input type="radio" id="type" name="type" class="form-check-input" value="2" {if $info.type == 2}checked{/if}>
                  <label class="form-check-label" for="type">权限认证</label>
                </div>
              </div>
            </div>
            <div class="mb-3 col-md-12">
              <label for="type" class="form-label">上级</label>
              <div class="form-controls">
                <select name="pid" class="form-select" id="pid">
                    <option value="0" {if $info.pid == 0}selected="selected"{/if}>作为一级菜单</option>
                    {volist name="tree_menu" id="v1"}
                    <option value="{$v1.id}" {if $info.pid == $v1.id}selected="selected"{/if}>{$v1.title}</option>
                      {volist name="v1.second" id="v2"}
                      <option value="{$v2.id}" {if $info.pid == $v2.id}selected="selected"{/if}>&nbsp;├ {$v2.title}</option>
                      {/volist}
                    {/volist}
                </select>
              </div>
            </div>
            <div class="mb-3 col-md-12">
              <label for="title" class="form-label">标题</label>
              <input type="text" class="form-control" id="title" name="title" value="{$info.title}" placeholder="请输入标题" />
            </div>
            <div class="mb-3 col-md-12">
              <label for="route" class="form-label">路由</label>
              <input type="text" class="form-control" id="route" name="route" value="{$info.route}" placeholder="请输入路由"  />
            </div>
            <div class="mb-3 col-md-12">
              <label for="icon" class="form-label">图标</label>
              <input type="text" class="form-control" id="icon" name="icon" value="{$info.icon}" placeholder="请输入图标"  />
            </div>
            <div class="mb-3 col-md-12">
              <label for="weigh" class="form-label">排序</label>
              <input type="text" class="form-control" id="weigh" name="weigh" value="{$info.weigh}" />
            </div>
            <div class="mb-3 col-md-12">
              <label for="remark" class="form-label">备注</label>
              <textarea class="form-control" name="remark" rows="5" placeholder="描述">{$info.remark}</textarea>
            </div>
            <div class="mb-3 col-md-12">
              <label for="is_show" class="form-label">是否显示为菜单</label>
              <div class="clearfix">
                <div class="form-check form-check-inline">
                  <input type="radio" id="is_show" name="is_show" class="form-check-input" value="1" {if $info.is_show == 1}checked{/if}>
                  <label class="form-check-label" for="is_show">显示</label>
                </div>
                <div class="form-check form-check-inline">
                  <input type="radio" id="is_show" name="is_show" class="form-check-input" value="0" {if $info.is_show == 0}checked{/if}>
                  <label class="form-check-label" for="is_show">不显示</label>
                </div>
              </div>
            </div>
            <div class="mb-3 col-md-12">
              <label for="status" class="form-label">状态</label>
              <div class="clearfix">
                <div class="form-check form-check-inline">
                  <input type="radio" id="status" name="status" class="form-check-input" value="1" {if $info.status == 1}checked{/if}>
                  <label class="form-check-label" for="status">启用</label>
                </div>
                <div class="form-check form-check-inline">
                  <input type="radio" id="status" name="status" class="form-check-input" value="0" {if $info.status == 0}checked{/if}>
                  <label class="form-check-label" for="status">禁用</label>
                </div>
              </div>
            </div>
            <input type="hidden" name="id" value="{$info.id}">
            <input type="hidden" id="jump_url" value="{$action}">
            <div class="mb-3 col-md-12">
              <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" id="close_layer_open">返 回</button>
            </div>
          </form>
          
        </div>
      </div>
    </div>
        
  </div>
  
</div>
{include file="public/script"}

<script type="text/javascript">

</script>
</body>
</html>